<template>
    <table border="1">
    <tr>
        <td>用户编号</td>
        <td>{{ data.Uid }}</td>
    </tr>
    <tr>
        <td>用户名</td>
        <td>{{ data.Uname }}</td>
    </tr>
    <tr>
        <td>用户密码</td>
        <td>******</td>
    </tr>
    <tr>
        <td>用户角色</td>
        <td>{{ data.Rname}}</td>
    </tr>
    <tr>
        <td>用户状态</td>
        <td>{{data.Ustate==1?"未删除":"已删除" }}</td>
    </tr>
</table>
</template>
<script setup lang="ts">
import axios from 'axios';
import { ref,onMounted } from 'vue';
import { useRoute, useRouter } from 'vue-router';
const route= useRoute();
const router = useRouter();
const data=ref({})
onMounted(()=>{
    Show()
})
const Show=()=>{
    axios.get('https://localhost:44396/api/UserRole/ShowUserById',
        {
            params:{
                Uid:route.query.Uid
            }
        }
    ).then(res=>{
        data.value=res.data[0]
        console.log(res.data)
    }).catch(err=>{
        console.log(err)
    })
}
    

</script>